//package com.demo.filter;
//
//import org.springframework.boot.web.servlet.FilterRegistrationBean;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import javax.servlet.FilterRegistration;
//import java.util.ArrayList;
//import java.util.List;
//
//@Configuration
//public class FilterRegister {
//
//    @Bean
//    public FilterRegistrationBean MyFilter(){
//        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
//        MyFilter myFilter2 = new MyFilter();
//        filterRegistrationBean.setFilter(myFilter2);
//        List<String> urls = new ArrayList<>();
//        urls.add("/list");
//        urls.add("/cj");
//        filterRegistrationBean.setUrlPatterns(urls);
//        return filterRegistrationBean;
//    }
//}
